package index

import "github.com/gin-gonic/gin"

type IndexClass struct {
	e *gin.Engine
}

func NewIndexClass(e *gin.Engine) *IndexClass {
	return &IndexClass{e: e}
}

func (i *IndexClass) GetIndex() gin.HandlerFunc {
	return func(c *gin.Context) {
		c.JSON(200, gin.H{
			"msg": "hello",
		})
	}
}

func (i *IndexClass) Build() {
	i.e.Handle("GET", "/", i.GetIndex())
}
